home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / WINDOWS / LZAPI.ZIP / LZRES.ZIP / LZRES.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-03-29  |  1.8 KB  |  63 lines

  1. {* LZRES.PAS ---------------------------------------------------*
  2.  * Header definition File for LZRES.OBJ                *
  3.  * (Decompression of Resources stored inside of LZH-Arhcives)    *
  4.  * (C) 1995 Dipl. Ing. Bernd herd Dipl. Ing. Herald Nuding    *
  5.  * Heidelberger Landstr. 316 D-64297 Darmstadt, 0049-6151-591216*
  6.  *--------------------------------------------------------------*}
  7.  
  8. { LZRES.OBJ is a very well optimizes LZH-Decompressor allowing you
  9.   to decompress an LZH-Archiv stored in
  10.  
  11.   - a Memory Block            or
  12.   - a Resource
  13.  
  14.   directly into a GlobalAlloc-Handle that it will create.
  15.  
  16.   In addition you may Decompress a LHA-Archiv stored in a Resource and
  17.   create a Bitmap-handle from it.
  18.  
  19.   To do that:
  20.  
  21.   - Compress the Bitmap as a BMP-File via
  22.  
  23.     LHA -h0 a <filename> <filename.bmp>
  24.  
  25.   - Include a line for the LZH-Archiv in your Resource:
  26.  
  27.     <filename> RCDATA "<filename>.LZH"
  28.  
  29.   - Use "USES LZRes" in your Pascal.Program.
  30.  
  31.   - Use LoadLZHBitmap(hInstance, '<filename>', NULL)
  32.  
  33.     as you wild with a normal LoadBitmap-Call }
  34.  
  35.  
  36. Unit LZRes;
  37.  
  38. Interface
  39. uses WinTypes, WinProcs, Win31;
  40.  
  41.  
  42. function LoadLZHResource( hInst : THandle; ResId : PChar; ArcFile : PChar; iBytesToOmit : Integer ) : THandle; far;
  43.  
  44. function LoadLZHBitmap( hInst : THandle; ResId : PChar; ArcFile : PChar ) : THandle; far;
  45.  
  46. function DecompressLZH( SourcePtr : Pointer; ArcFile : PChar; iBytesToOmit : Integer ) : THandle; far;
  47.  
  48. implementation
  49.  
  50.  
  51. Procedure __AHIncr; Far; External 'KERNEL' Index 114;
  52.  
  53.  
  54. function LoadLZHResource( hInst : THandle; ResId : PChar; ArcFile : PChar; iBytesToOmit : Integer ) : THandle; external;
  55.  
  56. function LoadLZHBitmap( hInst : THandle; ResId : PChar; ArcFile : PChar ) : THandle; external;
  57.  
  58. function DecompressLZH( SourcePtr : Pointer; ArcFile : PChar; iBytesToOmit : Integer ) : THandle; external;
  59.  
  60.   {$L LZRES.Obj}
  61.  
  62.  
  63. End.